Skip to content

Conversation

JuneYub
Copy link
Contributor

@JuneYub JuneYub commented Aug 9, 2025

Improves Javadoc as requested in #4112.
The wiki is deprecated, so I've focused on the code-level documentation.

Closes #4112

@ggivo
Copy link
Collaborator

ggivo commented Aug 11, 2025

@JuneYub

Improves Javadoc as requested in #4112. The wiki is deprecated, so I've focused on the code-level documentation.

Deprecation goes for "Release Notes" section itself.

My idea is to use the wiki as a dev-friendly doc with more code examples.
Once we have the example wrapped up, we can also consider adding some of them to the official doc.
I suggest adding a coding example under the https://github.com/redis/jedis/wiki/AdvancedUsage section.

cc: @andy-stark-redis

PS: @JuneYub forgot to say, Hi and thanks for the involvement!

@JuneYub
Copy link
Contributor Author

JuneYub commented Aug 11, 2025

@ggivo

Hello, thank you for the review.
I've realized that a documentation update is needed to reflect the changes in this PR. Specifically, it seems the AdvancedUsage.md page in the Wiki should be updated.
Since I don't seem to have direct permission to edit the Wiki, I'd like to ask for the best way to propose the documentation changes.
Should I leave the proposed content here as a comment in this PR?
Please let me know the preferred method for the project, and I will proceed accordingly.
Thank you.

@ggivo
Copy link
Collaborator

ggivo commented Aug 11, 2025

@JuneYub
Ahh.. My bad, wikis are quite outdated. I meant to update https://redis.github.io/jedis/
You can update directly advanced-usage.md and add it to the review,

You can take a look at docs/README.md how to generate docs locally, then advanced-usage should be available at http://0.0.0.0:8000/advanced-usage/

Hope it helps...

@JuneYub
Copy link
Contributor Author

JuneYub commented Aug 12, 2025

Hi @ggivo,

Thanks for the feedback!

I have added the documentation for HostAndPortMapper to advanced-usage.md as you requested.

To help users better understand its usage, I've included examples for both implementing it with a dedicated class and using a more concise lambda expression, especially since it's a functional interface.

Please take a look when you have a moment. I'm open to any further suggestions.

Thanks!

@ggivo
Copy link
Collaborator

ggivo commented Aug 13, 2025

@JuneYub
Looks good overall!

However, as part of our ongoing effort to simplify the API, we’re aiming to reduce the number of public constructors and promote the single constructor that accepts a JedisClientConfig. This approach centralizes multiple connection parameters into a single object (see here) and is the recommended way forward.
I suggest examples provided to be based on DefaultJedisClientConfig (see here) or based on JedisClientConfig (see here) directly.

@JuneYub
Copy link
Contributor Author

JuneYub commented Aug 13, 2025

@ggivo
Thanks for the clarification! Updated the docs to use DefaultJedisClientConfig as suggested.
Learned a better approach for simplifying constructor usage.

ggivo
ggivo previously approved these changes Aug 14, 2025
@ggivo ggivo requested a review from Copilot August 14, 2025 05:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the documentation for the HostAndPortMapper interface as requested in issue #4112. The changes focus on enhancing code-level documentation since the wiki is deprecated.

  • Added comprehensive Javadoc comments to the HostAndPortMapper interface
  • Added detailed documentation section in advanced-usage.md explaining the purpose and usage of HostAndPortMapper
  • Provided practical examples showing both class-based and lambda-based implementations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/main/java/redis/clients/jedis/HostAndPortMapper.java Added interface-level Javadoc and method documentation with @FunctionalInterface annotation
docs/advanced-usage.md Added comprehensive documentation section with examples for NAT/containerization scenarios

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ggivo ggivo added this to the 6.2.0 milestone Aug 14, 2025
ggivo
ggivo previously approved these changes Aug 14, 2025
@ggivo ggivo merged commit 9312acc into redis:master Aug 14, 2025
10 checks passed
@ggivo
Copy link
Collaborator

ggivo commented Aug 14, 2025

@JuneYub
Merged. Thanks for the amazing work.

svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Aug 28, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
| [redis.clients:jedis](https://github.com/redis/jedis) | dependencies |
misk/gradle/libs.versions.toml | gradle | minor | `6.1.0` -> `6.2.0` |
|
[com.google.cloud:google-cloud-spanner](https://github.com/googleapis/java-spanner)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`6.98.1` -> `6.99.0` |

---

### Release Notes

<details>
<summary>redis/jedis (redis.clients:jedis)</summary>

### [`v6.2.0`](https://github.com/redis/jedis/releases/tag/v6.2.0):
6.2.0

### Changes

#### 🚀 New Features

- \[vector sets] Support for VSIM WITHATTRIBS (CAE-1421)
([#&#8203;4260](redis/jedis#4260))
- Support Redis 8 vector sets
[#&#8203;4169](redis/jedis#4169)
([#&#8203;4203](redis/jedis#4203))

#### 🐛 Bug Fixes

- Fix JedisBroadcastException in functionLoadReplace for Redis Cluster
([#&#8203;4219](redis/jedis#4219))

#### 🧰 Maintenance

- Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to
3.11.3 ([#&#8203;4246](redis/jedis#4246))
- Bump org.junit:junit-bom from 5.13.3 to 5.13.4
([#&#8203;4216](redis/jedis#4216))
- docs: Improve Javadoc for HostAndPortMapper
([#&#8203;4112](redis/jedis#4112))
([#&#8203;4227](redis/jedis#4227))

#### Contributors

We'd like to thank all the contributors who worked on this release!

[@&#8203;JuneYub](https://github.com/JuneYub),
[@&#8203;Kguswo](https://github.com/Kguswo),
[@&#8203;dependabot](https://github.com/dependabot),
[@&#8203;dependabot](https://github.com/dependabot)\[bot] and
[@&#8203;ggivo](https://github.com/ggivo)

</details>

<details>
<summary>googleapis/java-spanner
(com.google.cloud:google-cloud-spanner)</summary>

###
[`v6.99.0`](https://github.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6990-2025-08-26)

##### Features

- Support read lock mode for R/W transactions
([#&#8203;4010](googleapis/java-spanner#4010))
([7d752d6](googleapis/java-spanner@7d752d6))

##### Bug Fixes

- **deps:** Update the Java code generator (gapic-generator-java) to
2.62.0
([52c68db](googleapis/java-spanner@52c68db))
- GetCommitResponse() should return error if tx has not committed
([#&#8203;4021](googleapis/java-spanner#4021))
([a2c179f](googleapis/java-spanner@a2c179f))

##### Dependencies

- Update dependency com.google.cloud:sdk-platform-java-config to v3.52.0
([#&#8203;4024](googleapis/java-spanner#4024))
([7e3294f](googleapis/java-spanner@7e3294f))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: 9d031eaaab2d726402884bd41681c856931f12f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document HostAndPortMapper usage
2 participants